#include "ArmyState.h"
#include "UserAPI.h"
#include "BasicAI.h"
#include "params.h"

using namespace ArmyStateNS;

void BaseState::enter_state(GeneralType name, BaseState *from_state, BaseState *next_state)
{
	from_state->cancel();
	BasicAI::instance()->set_army_state(name, next_state);
	next_state->execute();
}

void BaseState::require_action(GeneralType fellow, BaseState *required_state)
{
	BaseState *current_state = BasicAI::instance()->get_army_state(fellow);
	//	TODO	required_state should be a temporary state
	BasicAI::instance()->set_army_state(fellow, required_state);
}

